package zulu.editorTest;

import static bogus.core.BogusCore.egl;
import owg.util.Camera2D;
import owg.util.InstanceList;
import owg.util.editor2d.Editor2D;
import owg.util.euclidian.V2D;
import owg.util.opengl.ColorF;
import world.Global;
import bogus.core.BogusCore;
import bogus.core.CoreParams;
import bogus.minigame.MinigameBase;

public class EditorTest implements MinigameBase 
{
	public InstanceList list;
	public Editor2D ed;
	public Camera2D cam;
	
	@Override
	public void init() {
		list = new InstanceList();
		cam = new Camera2D(list, new V2D(), new V2D(320, 240), BogusCore.getCanvas(), true);
		cam.clearColor = ColorF.BOGUSBLUE;
		ed = new Editor2D(list, BogusCore.getCanvas(), Global.contentRelative("editor"), null, false, Editor2D.STEP_ONLY_EDITOR, cam, true, "zulu.editorTest");
	}
	
	@Override
	public CoreParams getCoreParams() {
		return new CoreParams();
	}
	
	@Override
	public void step() {
		list.step();
	}
	
	@Override
	public void render() {
		egl.clearScreen(ColorF.GRAY);
		list.render();
	}
	
	@Override
	public void dispose() {
		list.destroyAll();
	}
	
}
